package com.talangniao.db;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

public class ConnectionManager {
	
	private DataSource datasource;
    
    public void setDatasource(DataSource ds){
        this.datasource = ds;
    }
    public  Connection getCon(){
        Connection con = null;
        try {
            con = this.datasource.getConnection();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return con;
    }

}
